#ifndef __IDEVICE_H__
#define __IDEVICE_H__

#include "../Header.h"

class IDevice
{
protected:
	void(*m_UpdateFunc)(float);
	void(*m_DrawFunc)();
	void(*m_SelectedFunc)();
	
	static IDevice* m_Instance;
protected:
	IDevice() :m_UpdateFunc(NULL), m_DrawFunc(NULL){}
	virtual void DestroyView() = 0;
	virtual ~IDevice(){}
public:
	virtual void RegisterUpdateFunc(void(*UpdateFunc)(float)) = 0;
	virtual void RegisterDrawFunc(void(*Draw)()) = 0;
	virtual void RegisterSelectedFunc(void(*Selected)()) = 0;
	virtual void Run() = 0;

	static void SetInstance(IDevice*);
	static IDevice* GetInstance();
	static void DestroyInstance();
};

#endif